package com.yumeng.framework.persistence.mybatis.base.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yumeng.common.data.enums.DelFlag;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 基于Mybatis-plus 公共Entity
 * @author wxd
 * @date 2021/9/7 12:25
 */
@Getter
@Setter
public class MpBaseEntity_CD extends MpBaseEntity {

    private static final long serialVersionUID = 1L;

    public MpBaseEntity_CD(){}
    public MpBaseEntity_CD(boolean isAdd){
        if (isAdd){
            delFlag = DelFlag.UN_DEL.getCode();
        }
    }

    @TableField(value = "creater", fill = FieldFill.INSERT)
    private Long creater;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "del_flag")
    private Integer delFlag;

    @TableField(value = "deler")
    private Long deler;

    @TableField(value = "del_time")
    private LocalDateTime delTime;

}
